package com.wlz.demo.utils;

import java.util.HashMap;
import java.util.Map;

public class DataColorUitl {
    public static Map<String,String> createItemStyle(String star){
        String color = "";

        if (Boolean.valueOf(Integer.parseInt(star) < 50)){
            color = "#1d953f";
        }else if(Boolean.valueOf(Integer.parseInt(star) < 60)){
            color = "#f47920";
        }else if(Boolean.valueOf(Integer.parseInt(star) < 100)){
            color = "#694d9f";
        }else if(Boolean.valueOf(Integer.parseInt(star) < 150)){
            color = "#90d7ec";
        }else {
            color = "#225a1f";
        }
        Map<String,String> map = new HashMap<>();
        map.put("color",color);
        return map;
    }
}
